private void Window_Loaded(object sender, RoutedEventArgs e) { /** * IntPtr desktopPtr = GetDC(IntPtr.Zero); * System.Drawing.Graphics g = System.Drawing.Graphics.FromHdc(desktopPtr); * * System.Drawing.SolidBrush b = new System.Drawing.SolidBrush(System.Drawing.Color.White); * g.FillRectangle(b, new System.Drawing.Rectangle(1280, 720, 50, 50)); * * g.Dispose(); * ReleaseDC(IntPtr.Zero, desktopPtr); **/ GlobalHook.GlobalAction += GlobalHook_GlobalAction; MainFunction.serverLog += "Dotter Initialization\n"; MainFunction.serverLogTime += DateTime.Now.ToLongTimeString() + '\n'; MainFunction.LoadSettings(); ProcessDataThread = new Thread(new ParameterizedThreadStart(MainFunction.ThreadlizedProcessData)); ProcessDataThread.Start(ServerAddrTb.Text); refreshTimer.Interval = new TimeSpan(0, 0, 15); refreshTimer.Tick += refreshTimer_Tick; refreshTimer.Start(); clockTimer.Interval = new TimeSpan(0, 0, 1); clockTimer.Tick += clockTimer_Tick; clockTimer.Start(); this.Topmost = true; }
public void Changer(object sender, TextChangedEventArgs e) { TextBox targetObj = sender as TextBox; switch (targetObj.Name) { case "ColorTb": try { DotEllipse.Stroke = new SolidColorBrush(MainFunction.ConvertColor(ColorTb.Text)); } catch (Exception) { DebugTb.Text += "DotEllipse.Stroke : Exception occured\n"; } break; case "SizeTb": try { DotEllipseScale.ScaleX = Convert.ToDouble(SizeTb.Text); DotEllipseScale.ScaleY = Convert.ToDouble(SizeTb.Text); DotCrossScale.ScaleX = Convert.ToDouble(SizeTb.Text); DotCrossScale.ScaleY = Convert.ToDouble(SizeTb.Text); DotTacticScale.ScaleX = Convert.ToDouble(SizeTb.Text); DotTacticScale.ScaleY = Convert.ToDouble(SizeTb.Text); } catch (Exception) { DebugTb.Text += "Dot*.Scale? : Exception occured\n"; } break; case "StrokeTb": try { DotEllipse.StrokeThickness = Convert.ToDouble(StrokeTb.Text); } catch (Exception) { DebugTb.Text += "DotEllipse.StrokeThickness : Exception occured\n"; } break; } }
private void PlayerFilterTb_TextChanged(object sender, TextChangedEventArgs e) { MainFunction.FilteredParsor(PlayerFilterTb.Text); PlayerList.Text = MainFunction.playerList; }
private void MinButton_MouseLeftButtonUp(object sender, MouseButtonEventArgs e) { SettingPanel.Visibility = Visibility.Collapsed; MainFunction.SaveSettings(); }
private void ExitButton_MouseLeftButtonUp(object sender, MouseButtonEventArgs e) { tbi.Visibility = Visibility.Collapsed; this.Close(); MainFunction.SaveSettings(); }