mirror of
https://github.com/MrUnknownDE/VRCX.git
synced 2026-05-06 22:46:06 +02:00
sanity check
This commit is contained in:
@@ -59,11 +59,17 @@ namespace VRCX
|
|||||||
{
|
{
|
||||||
var values = new object[reader.FieldCount];
|
var values = new object[reader.FieldCount];
|
||||||
reader.GetValues(values);
|
reader.GetValues(values);
|
||||||
callback.ExecuteAsync(null, values);
|
if (callback.CanExecute == true)
|
||||||
|
{
|
||||||
|
callback.ExecuteAsync(null, values);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
callback.ExecuteAsync(null, null);
|
if (callback.CanExecute == true)
|
||||||
|
{
|
||||||
|
callback.ExecuteAsync(null, null);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
finally
|
finally
|
||||||
{
|
{
|
||||||
@@ -72,7 +78,10 @@ namespace VRCX
|
|||||||
}
|
}
|
||||||
catch (Exception e)
|
catch (Exception e)
|
||||||
{
|
{
|
||||||
callback.ExecuteAsync(e.Message, null);
|
if (callback.CanExecute == true)
|
||||||
|
{
|
||||||
|
callback.ExecuteAsync(e.Message, null);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
callback.Dispose();
|
callback.Dispose();
|
||||||
|
|||||||
@@ -4,6 +4,7 @@ using System.Collections.Generic;
|
|||||||
using System.IO;
|
using System.IO;
|
||||||
using System.Net;
|
using System.Net;
|
||||||
using System.Runtime.Serialization.Formatters.Binary;
|
using System.Runtime.Serialization.Formatters.Binary;
|
||||||
|
using System.Windows.Forms;
|
||||||
|
|
||||||
namespace VRCX
|
namespace VRCX
|
||||||
{
|
{
|
||||||
@@ -125,11 +126,14 @@ namespace VRCX
|
|||||||
using (var stream = response.GetResponseStream())
|
using (var stream = response.GetResponseStream())
|
||||||
using (var streamReader = new StreamReader(stream))
|
using (var streamReader = new StreamReader(stream))
|
||||||
{
|
{
|
||||||
callback.ExecuteAsync(null, new
|
if (callback.CanExecute == true)
|
||||||
{
|
{
|
||||||
data = await streamReader.ReadToEndAsync(),
|
callback.ExecuteAsync(null, new
|
||||||
status = response.StatusCode
|
{
|
||||||
});
|
data = await streamReader.ReadToEndAsync(),
|
||||||
|
status = response.StatusCode
|
||||||
|
});
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
catch (WebException webException)
|
catch (WebException webException)
|
||||||
@@ -139,14 +143,17 @@ namespace VRCX
|
|||||||
using (var stream = response.GetResponseStream())
|
using (var stream = response.GetResponseStream())
|
||||||
using (var streamReader = new StreamReader(stream))
|
using (var streamReader = new StreamReader(stream))
|
||||||
{
|
{
|
||||||
callback.ExecuteAsync(null, new
|
if (callback.CanExecute == true)
|
||||||
{
|
{
|
||||||
data = await streamReader.ReadToEndAsync(),
|
callback.ExecuteAsync(null, new
|
||||||
status = response.StatusCode
|
{
|
||||||
});
|
data = await streamReader.ReadToEndAsync(),
|
||||||
|
status = response.StatusCode
|
||||||
|
});
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else if (callback.CanExecute == true)
|
||||||
{
|
{
|
||||||
callback.ExecuteAsync(webException.Message, null);
|
callback.ExecuteAsync(webException.Message, null);
|
||||||
}
|
}
|
||||||
@@ -154,8 +161,11 @@ namespace VRCX
|
|||||||
}
|
}
|
||||||
catch (Exception e)
|
catch (Exception e)
|
||||||
{
|
{
|
||||||
// FIXME: 브라우저는 종료되었는데 얘는 이후에 실행되면 터짐
|
if (callback.CanExecute == true)
|
||||||
callback.ExecuteAsync(e.Message, null);
|
{
|
||||||
|
// FIXME: 브라우저는 종료되었는데 얘는 이후에 실행되면 터짐
|
||||||
|
callback.ExecuteAsync(e.Message, null);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
callback.Dispose();
|
callback.Dispose();
|
||||||
|
|||||||
Reference in New Issue
Block a user