public MainForm()
        {
            InitializeComponent();
            Text = Program.AssemblyTitle;

            _displayPropertyDescription = BrawlBox.Properties.Settings.Default.DisplayPropertyDescriptionWhenAvailable;
            _updatesOnStartup           = BrawlBox.Properties.Settings.Default.CheckUpdatesAtStartup;
            _showHex           = BrawlBox.Properties.Settings.Default.ShowHex;
            _compatibilityMode = BrawlLib.Properties.Settings.Default.CompatibilityMode;

#if !DEBUG //Don't need to see this every time a debug build is compiled
            if (CheckUpdatesOnStartup)
            {
                CheckUpdates(false);
            }
#else
            Text += " DEBUG";
#endif
            soundPackControl1._grid = propertyGrid1;
            soundPackControl1.lstSets.SmallImageList = ResourceTree.Images;
            foreach (Control c in splitContainer2.Panel2.Controls)
            {
                c.Visible = false;
                c.Dock    = DockStyle.Fill;
            }
            m_DelegateOpenFile = new DelegateOpenFile(Program.Open);
            _instance          = this;

            _currentControl = modelPanel1;

            modelPanel1.CurrentViewport._allowSelection = false;

            RecentFileHandler = new RecentFileHandler(this.components);
            RecentFileHandler.RecentFileToolStripItem = this.recentFilesToolStripMenuItem;
        }
예제 #2
0
        public MainForm()
        {
            InitializeComponent();

            Text = Program.AssemblyTitle;
//#if _DEBUG
//            Text += " - DEBUG";
//#endif
            soundPackControl1._grid = propertyGrid1;
            soundPackControl1.lstSets.SmallImageList = ResourceTree.Images;
            msBinEditor1.Dock                            =
                animEditControl.Dock                     =
                    texAnimEditControl.Dock              =
                        shpAnimEditControl.Dock          =
                            soundPackControl1.Dock       =
                                audioPlaybackPanel1.Dock =
                                    clrControl.Dock      =
                                        visEditor.Dock   =
                                            scN0CameraEditControl1.Dock                  =
                                                scN0LightEditControl1.Dock               =
                                                    scN0FogEditControl1.Dock             =
                                                        modelPanel1.Dock                 =
                                                            previewPanel2.Dock           =
                                                                videoPlaybackPanel1.Dock =
                                                                    DockStyle.Fill;
            m_DelegateOpenFile            = new DelegateOpenFile(Program.Open);
            _instance                     = this;
            modelPanel1._forceNoSelection = true;
            _currentControl               = modelPanel1;

            RecentFileHandler = new RecentFileHandler(this.components);
            RecentFileHandler.RecentFileToolStripItem = this.recentFilesToolStripMenuItem;
        }
예제 #3
0
 private void JIAAI04_Load(object sender, EventArgs e)
 {
     try
     {
         this.AllowDrop     = true;
         m_DelegateOpenFile = new DelegateOpenFile(this.OpenFile);
         SetDataTable();
         this.dtpFrom.Text = System.DateTime.Now.ToString("yyyy-MM-dd");
     }
     catch (Exception ex)
     {
         Basic.ShowMessage(3, ex.Message);
     }
 }
예제 #4
0
        private void MainForm_Load(object sender, EventArgs e)
        {
            // create delegate used for asynchronous call
            openFileDelegate = new DelegateOpenFile(this.OpenFile);

            watcher = new FileSystemWatcher(@"c:\", "*.*");
            watcher.NotifyFilter = NotifyFilters.LastAccess | NotifyFilters.LastWrite
                                   | NotifyFilters.FileName;

            watcher.Created += new FileSystemEventHandler(OnCreated);

            watcher.EnableRaisingEvents = false;
            Loaded = true;

            StartServer();
        }
예제 #5
0
        public MainWindow()
        {
            Loaded += MyWindow_Loaded;
            InitializeComponent();
            //Percentage.Content = String.Empty;
            this.AllowDrop   = true;
            openFileDelegate = new DelegateOpenFile(this.OpenFile);
            var typeConverter        = new HighlightingDefinitionTypeConverter();
            var xmlSyntaxHighlighter = (IHighlightingDefinition)typeConverter.ConvertFrom("XML");

            xmlin.SyntaxHighlighting = xmlSyntaxHighlighter;
            xmlin.ShowLineNumbers    = true;
            DispatcherTimer foldingUpdateTimer = new DispatcherTimer();

            foldingUpdateTimer.Interval = TimeSpan.FromSeconds(2);
            foldingUpdateTimer.Tick    += foldingUpdateTimer_Tick;
            foldingUpdateTimer.Start();
            xmlin.FontFamily = new System.Windows.Media.FontFamily("Consolas");
            xmlin.FontSize   = 13.333333333333333; // 10pt
            TextOptions.SetTextFormattingMode(xmlin, TextFormattingMode.Ideal);
            SolidColorBrush color = new SolidColorBrush(Color.FromRgb(243, 243, 243));

            xmlin.Background = color;

            //Expander
            starHeight    = new GridLength[expanderGrid.RowDefinitions.Count];
            starHeight[0] = expanderGrid.RowDefinitions[0].Height;
            starHeight[2] = expanderGrid.RowDefinitions[2].Height;
            ExpandedOrCollapsed(topExpander);
            ExpandedOrCollapsed(bottomExpander);

            // InitializeComponent calls topExpander.Expanded
            topExpander.Expanded     += ExpandedOrCollapsed;
            topExpander.Collapsed    += ExpandedOrCollapsed;
            bottomExpander.Expanded  += ExpandedOrCollapsed;
            bottomExpander.Collapsed += ExpandedOrCollapsed;

            // Create the events for the Background Worker.
            if (worker.IsBusy != true)
            {
                worker.WorkerReportsProgress      = true;
                worker.WorkerSupportsCancellation = true;
                worker.DoWork             += new DoWorkEventHandler(worker_DoWork);
                worker.ProgressChanged    += new ProgressChangedEventHandler(worker_ProgressChanged);
                worker.RunWorkerCompleted += new RunWorkerCompletedEventHandler(worker_RunWorkerCompleted);
            }
        }
        public ResourceTree()
        {
            SetStyle(ControlStyles.UserMouse, true);

            _timer.Interval = 200;
            _timer.Tick    += new EventHandler(timer_Tick);

            AllowDrop = true;

            ItemDrag     += new ItemDragEventHandler(treeView_ItemDrag);
            DragOver     += new DragEventHandler(treeView1_DragOver);
            DragDrop     += new DragEventHandler(treeView1_DragDrop);
            DragEnter    += new DragEventHandler(treeView1_DragEnter);
            DragLeave    += new EventHandler(treeView1_DragLeave);
            GiveFeedback += new GiveFeedbackEventHandler(treeView1_GiveFeedback);

            m_DelegateOpenFile = new DelegateOpenFile(ImportFile);
        }
예제 #7
0
파일: Main.cs 프로젝트: 1059444127/Dicom-4
        private void MainForm_Load(object sender, EventArgs e)
        {
            // create delegate used for asynchronous call
            OpenFileDelegate = new DelegateOpenFile(this.OpenFile);

            // Restore the main form location and state from the registry.
            using (RegistryKey regMainFormPos = Registry.CurrentUser.CreateSubKey("Software\\Carestream Health\\DicomEditor\\Main Form Position"))
            {
                Point formLoc = new Point();
                formLoc.X            = (int)regMainFormPos.GetValue("Location.X", 100);
                formLoc.Y            = (int)regMainFormPos.GetValue("Location.Y", 100);
                this.DesktopLocation = formLoc;

                Size formSize = new Size();
                formSize.Width  = (int)regMainFormPos.GetValue("Size.Width", this.Size.Width);
                formSize.Height = (int)regMainFormPos.GetValue("Size.Height", this.Size.Height);
                this.Size       = formSize;

                WindowState = (FormWindowState)regMainFormPos.GetValue("Window State", FormWindowState.Normal);
            }

            StartServer();
        }
예제 #8
0
        public MainForm()
        {
            InitializeComponent();
            Text = Program.AssemblyTitle;

            _displayPropertyDescription = BrawlBox.Properties.Settings.Default.DisplayPropertyDescriptionWhenAvailable;
            _updatesOnStartup           = BrawlBox.Properties.Settings.Default.CheckUpdatesAtStartup;

#if !DEBUG //Don't need to see this every time a debug build is compiled
            if (CheckUpdatesOnStartup)
            {
                CheckUpdates(false);
            }
#else
            Text += " DEBUG";
#endif

            foreach (string filename in new string[] {
                "BrawlLib.dll",
                "OpenTK.dll",
                "Octokit.dll",
                "Updater.exe"
            })
            {
                string directory = Path.GetDirectoryName(Assembly.GetEntryAssembly().Location);
                if (File.Exists(Path.Combine(directory, filename)))
                {
                    if (File.Exists(Path.Combine(directory, "lib", filename)))
                    {
                        MessageBox.Show(@"The directory structure of BrawlBox has changed.
Please delete the files BrawlLib.dll, OpenTK.dll, Octokit.dll, and Updater.exe;
newer versions of these files should be located in the Lib directory.");
                        Enabled = false;
                        break;
                    }
                }
            }

            soundPackControl1._grid = propertyGrid1;
            soundPackControl1.lstSets.SmallImageList = ResourceTree.Images;
            foreach (Control c in splitContainer2.Panel2.Controls)
            {
                c.Visible = false;
                c.Dock    = DockStyle.Fill;
            }
            m_DelegateOpenFile = new DelegateOpenFile(Program.Open);
            _instance          = this;

            _currentControl = modelPanel1;

            modelPanel1.CurrentViewport._allowSelection = false;

            RecentFileHandler = new RecentFileHandler(this.components);
            RecentFileHandler.RecentFileToolStripItem = this.recentFilesToolStripMenuItem;

            var plugins = $"{Application.StartupPath}/Plugins";
            var loaders = $"{Application.StartupPath}/Loaders";

            API.bboxapi.Plugins.Clear();
            API.bboxapi.Loaders.Clear();
            pluginToolStripMenuItem.DropDown.Items.Clear();
            if (Directory.Exists(plugins))
            {
                foreach (var str in Directory.EnumerateFiles(plugins, "*.py"))
                {
                    API.bboxapi.CreatePlugin(str, false);
                    pluginToolStripMenuItem.DropDownItems.Add(Path.GetFileNameWithoutExtension(str), null, onPluginClicked);
                }
            }
            if (Directory.Exists(loaders))
            {
                foreach (var str in Directory.EnumerateFiles(loaders, "*.py"))
                {
                    API.bboxapi.CreatePlugin(str, true);
                }
            }
        }
예제 #9
0
        public MainForm()
        {
            InitializeComponent();

            m_DelegateOpenFile = this.OpenFile;
        }
예제 #10
0
        public ModelEditControl()
        {
            InitializeComponent();
            leftPanel._mainWindow = this;
            rightPanel.pnlKeyframes._mainWindow =
            rightPanel.pnlBones._mainWindow =
            srt0Editor._mainWindow =
            shp0Editor._mainWindow =
            pat0Editor._mainWindow =
            vis0Editor._mainWindow =
            scn0Editor._mainWindow =
            clr0Editor._mainWindow =
            weightEditor._mainWindow =
            vertexEditor._mainWindow =
            pnlPlayback._mainWindow =
            chr0Editor._mainWindow =
            this;

            animEditors.HorizontalScroll.Enabled = addedHeight = (!(animEditors.Width - animCtrlPnl.Width >= pnlPlayback.MinimumSize.Width));
            if (pnlPlayback.Width <= pnlPlayback.MinimumSize.Width)
            {
                pnlPlayback.Dock = DockStyle.Left;
                pnlPlayback.Width = pnlPlayback.MinimumSize.Width;
            }
            else
                pnlPlayback.Dock = DockStyle.Fill;

            _interpolationEditor = new Forms.InterpolationEditor(this);

            leftPanel.fileType.DataSource = _editableAnimTypes;

            TargetAnimType = AnimType.CHR;
            m_DelegateOpenFile = new DelegateOpenFile(OpenFile);
            ScreenCapBgLocText.Text = Application.StartupPath + "\\ScreenCaptures";

            _timer = new CoolTimer();
            _timer.RenderFrame += _timer_RenderFrame;

            modelPanel.PreRender += (EventPreRender = new System.Windows.Forms.GLRenderEventHandler(this.modelPanel1_PreRender));
            modelPanel.PostRender += (EventPostRender = new System.Windows.Forms.GLRenderEventHandler(this.modelPanel1_PostRender));
            modelPanel.MouseDown += (EventMouseDown = new System.Windows.Forms.MouseEventHandler(this.modelPanel1_MouseDown));
            modelPanel.MouseMove += (EventMouseMove = new System.Windows.Forms.MouseEventHandler(this.modelPanel1_MouseMove));
            modelPanel.MouseUp += (EventMouseUp = new System.Windows.Forms.MouseEventHandler(this.modelPanel1_MouseUp));

            KeyframePanel.visEditor.EntryChanged += new EventHandler(this.VISEntryChanged);
            KeyframePanel.visEditor.IndexChanged += new EventHandler(this.VISIndexChanged);
        }
예제 #11
0
        public MainForm()
        {
            InitializeComponent();

            Text = Program.AssemblyTitle;
            //#if _DEBUG
            //            Text += " - DEBUG";
            //#endif
            soundPackControl1._grid = propertyGrid1;
            soundPackControl1.lstSets.SmallImageList = ResourceTree.Images;
            msBinEditor1.Dock =
            animEditControl.Dock =
            texAnimEditControl.Dock =
            shpAnimEditControl.Dock =
            soundPackControl1.Dock =
            audioPlaybackPanel1.Dock =
            clrControl.Dock =
            visEditor.Dock =
            scN0CameraEditControl1.Dock =
            scN0LightEditControl1.Dock =
            scN0FogEditControl1.Dock =
            modelPanel1.Dock =
            previewPanel2.Dock =
            videoPlaybackPanel1.Dock =
            DockStyle.Fill;
            m_DelegateOpenFile = new DelegateOpenFile(Program.Open);
            _instance = this;
            modelPanel1._forceNoSelection = true;
            _currentControl = modelPanel1;

            RecentFileHandler = new RecentFileHandler(this.components);
            RecentFileHandler.RecentFileToolStripItem = this.recentFilesToolStripMenuItem;
        }
        public ResourceTree()
        {
            SetStyle(ControlStyles.UserMouse, true);

            _timer.Interval = 200;
            _timer.Tick += new EventHandler(timer_Tick);

            AllowDrop = true;

            ItemDrag += new ItemDragEventHandler(treeView_ItemDrag);
            DragOver += new DragEventHandler(treeView1_DragOver);
            DragDrop += new DragEventHandler(treeView1_DragDrop);
            DragEnter += new DragEventHandler(treeView1_DragEnter);
            DragLeave += new EventHandler(treeView1_DragLeave);
            GiveFeedback += new GiveFeedbackEventHandler(treeView1_GiveFeedback);

            m_DelegateOpenFile = new DelegateOpenFile(ImportFile);
        }