Beispiel #1
0
        /// <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());
        }
Beispiel #2
0
        /// <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();
        }
Beispiel #3
0
        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");
        }
Beispiel #4
0
        public MainWindow()
        {
            InitializeComponent();
            _log                  = new ObservableCollection <string>();
            Log.ItemsSource       = _log;
            Topmost               = true;
            WindowStartupLocation = WindowStartupLocation.CenterScreen;
            //_updateProcess = Process.Start(@"\update progress.exe");

            worker = new BackgroundWorker
            {
                WorkerReportsProgress      = true,
                WorkerSupportsCancellation = true
            };
            worker.DoWork             += bgWorker_DoWork;
            worker.ProgressChanged    += bgWorker_ProgressChanged;
            worker.RunWorkerCompleted += bgWorker_RunWorkerCompleted;
            worker.RunWorkerAsync();

            _report  = Report;
            _finish  = FinishUpdate;
            _disable = Disable;
        }