/// <summary> /// Constructor for the form /// </summary> public BuildTools(Guid guid, Job job) { InitializeComponent(); _job = job; _runner = new Runner(this, _job); undoBT.Visible = false; progress.Visible = false; versionBox.SelectedIndex = 0; GetVersions(); // delegates _appendDelegate = AppendText; _appendRawDelegate = AppendRawText; _disableDelegate = Disable; _enableDelegate = Enable; _showProgressDelegate = ProgressShow; _hideProgressDelegate = ProgressHide; _indeterminateProgressDelegate = ProgressIndeterminate; _progressPercentDelegate = Progress; _updateVersionsDelegate = UpdateVersions; if (File.Exists(Program.CheckUpdate)) { string text = File.ReadAllText(Program.CheckUpdate); if (string.IsNullOrEmpty(text) || text.Trim().ToLower() == "false") { autoUpdateCB.Checked = false; } } Console.WriteLine(guid.ToString()); }
public static void LoadEntryPoints() { LoadPlatformEntryPoints (); Enable = (EnableDelegate)Marshal.GetDelegateForFunctionPointer (EntryPointHelper.GetAddress ("glEnable"), typeof(EnableDelegate)); ClearColor = (ClearColorDelegate)Marshal.GetDelegateForFunctionPointer (EntryPointHelper.GetAddress ("glClearColor"), typeof(ClearColorDelegate)); Clear = (ClearDelegate)Marshal.GetDelegateForFunctionPointer (EntryPointHelper.GetAddress ("glClear"), typeof(ClearDelegate)); }
/// <summary> /// Constructor for the form /// </summary> public BuildTools(Guid guid, Job job) { InitializeComponent(); _job = job; _googleAnalytics = new GoogleAnalytics(guid); _runner = new Runner(this, _job, _googleAnalytics); undoBT.Visible = false; progress.Visible = false; versionBox.SelectedIndex = 0; GetVersions(); // delegates _appendDelegate = AppendText; _appendRawDelegate = AppendRawText; _disableDelegate = Disable; _enableDelegate = Enable; _showProgressDelegate = ProgressShow; _hideProgressDelegate = ProgressHide; _indeterminateProgressDelegate = ProgressIndeterminate; _progressPercentDelegate = Progress; _updateVersionsDelegate = UpdateVersions; if (File.Exists(Program.CheckUpdate)) { string text = File.ReadAllText(Program.CheckUpdate); if (string.IsNullOrEmpty(text) || text.Trim().ToLower() == "false") { autoUpdateCB.Checked = false; } } Console.WriteLine(guid.ToString()); new Thread(delegate () { _googleAnalytics.SendEvent("Application", "Start"); }).Start(); }
internal static void LoadEntryPoints() { if (Viewport == null) { Viewport = LoadFunction <ViewportDelegate>("glViewport"); } if (Scissor == null) { Scissor = LoadFunction <ScissorDelegate>("glScissor"); } //if (MakeCurrent == null) // MakeCurrent = LoadFunction<MakeCurrentDelegate>("glMakeCurrent"); GetError = LoadFunction <GetErrorDelegate>("glGetError"); EnableVertexAttribArray = LoadFunction <EnableVertexAttribArrayDelegate>("glEnableVertexAttribArray"); DisableVertexAttribArray = LoadFunction <DisableVertexAttribArrayDelegate>("glDisableVertexAttribArray"); _getStringInternal = LoadFunction <GetStringDelegate>("glGetString"); ClearDepth = LoadFunction <ClearDepthDelegate>("glClearDepth") ?? LoadFunction <ClearDepthDelegate>("glClearDepthf"); Clear = LoadFunction <ClearDelegate>("glClear"); ClearColor = LoadFunction <ClearColorDelegate>("glClearColor"); ClearStencil = LoadFunction <ClearStencilDelegate>("glClearStencil"); Enable = LoadFunction <EnableDelegate>("glEnable"); Disable = LoadFunction <DisableDelegate>("glDisable"); BindBuffer = LoadFunction <BindBufferDelegate>("glBindBuffer"); //DrawBuffers = LoadFunction<DrawBuffersDelegate>("glDrawBuffers"); //DrawElements = LoadFunction<DrawElementsDelegate>("glDrawElements"); DrawArrays = LoadFunction <DrawArraysDelegate>("glDrawArrays"); //Uniform1i = LoadFunction<Uniform1iDelegate>("glUniform1i"); //Uniform4fv = LoadFunction<Uniform4fvDelegate>("glUniform4fv"); //ReadPixelsInternal = LoadFunction<ReadPixelsDelegate>("glReadPixels"); CreateShader = LoadFunction <CreateShaderDelegate>("glCreateShader"); ShaderSourceInternal = LoadFunction <ShaderSourceDelegate>("glShaderSource"); CompileShader = LoadFunction <CompileShaderDelegate>("glCompileShader"); ColorMask = LoadFunction <ColorMaskDelegate>("glColorMask"); //TODO: DepthFunc = LoadFunction<DepthFuncDelegate>("glDepthFunc"); DepthMask = LoadFunction <DepthMaskDelegate>("glDepthMask"); StencilMask = LoadFunction <StencilMaskDelegate>("glStencilMask"); GenBuffers = LoadFunction <GenBuffersDelegate>("glGenBuffers"); BufferData = LoadFunction <BufferDataDelegate>("glBufferData"); //MapBuffer = LoadFunction<MapBufferDelegate>("glMapBuffer"); //UnmapBuffer = LoadFunction<UnmapBufferDelegate>("glUnmapBuffer"); BufferSubData = LoadFunction <BufferSubDataDelegate>("glBufferSubData"); //DeleteBuffers = LoadFunction<DeleteBuffersDelegate>("glDeleteBuffers"); VertexAttribPointer = LoadFunction <VertexAttribPointerDelegate>("glVertexAttribPointer"); }
public MenuCanvas Initialize(Camera mainCamera, bool tutorialForced) { GetComponent <Canvas>().worldCamera = mainCamera; _settingsMenu = GetComponentInChildren <SettingsMenu>(); _settingsMenu.Initialize(tutorialForced); //_leaderboardMenu = GetComponentInChildren<LeaderboardMenu>(); _enableDelegate = EnableButtons; InitializeAlertPopUp() .InitializeLoadingScreen(); return(this); }
public MenuCanvas Initialize(Camera mainCamera, bool tutorialForced) { GetComponent<Canvas>().worldCamera = mainCamera; _settingsMenu = GetComponentInChildren<SettingsMenu>(); _settingsMenu.Initialize(tutorialForced); //_leaderboardMenu = GetComponentInChildren<LeaderboardMenu>(); _enableDelegate = EnableButtons; InitializeAlertPopUp() .InitializeLoadingScreen(); return this; }
private void EnableMessageBox(bool enable) { if (this.panelSendMessage.InvokeRequired) { var d = new EnableDelegate(EnableMessageBox); this.Invoke(d, new object[] { enable }); } else { this.panelSendMessage.Enabled = enable; } }
private void EnableAddressPanel(bool enable) { if (this.panelAddresses.InvokeRequired) { var d = new EnableDelegate(EnableAddressPanel); this.Invoke(d, new object[] { enable }); } else { this.panelAddresses.Enabled = enable; } }
private void EnableStopButton(bool enable) { if (this.buttonStop.InvokeRequired) { var d = new EnableDelegate(EnableStopButton); this.Invoke(d, new object[] { enable }); } else { this.buttonStop.Enabled = enable; } }
/// <summary> /// 初始化委托 /// </summary> private void initDelegates() { setOnlineDelegate = new EnableDelegate(onLog); enableSendDelegate = new EnableDelegate(onEnableSend); sendRtfDelegate = new SendRtfDelegate(onSendRtfDelegate); sendFileDelegate = new SendFileDelegate(SendFile); receiveRTFDelegate = new ReceiveRTFDelegate(onReceiveRTF); removeClientDelegate = new RemoveClientDelegate(onRemoveClient); askedForReceivingFileDelegate = new AskedForReceivingFileDelegate(onAskedForReceivingFile); stopSendingOrReceivingFileDelegate = new StopSendingOrReceivingFileDelegate(onStopSendingOrReceivingFile); showMessageDelegate = new ShowMessageDelegate(onShowMessage); setProgressDelegate = new SetProgressDelegate(onSetProgress); showProgressDelegate = new ShowProgressDelegate(onShowProgress); updateStatusDelegate = new UpdateStatusDelegate(onUpdateStatus); startTimingDelegate = new StartTimingDelegate(onStartTiming); }