コード例 #1
0
ファイル: MainForm.cs プロジェクト: mrshelton96/PackageThis
        private void MainForm_Load(object sender, EventArgs e)
        {
            // Unicode Start of String, chosen to avoid collisions possible with default sep
            // when we serialize the path to a file.
            TOCTreeView.PathSeparator = "\x0098";

            CreateTempDir();

            rootContentItem.currentLibrary = Properties.Settings.Default.currentLibrary;

            //statusStrip1.Items.Add(workingDir);
            statusStrip1.Items.Add(rootContentItem.name);

            populateLocaleMenu();
            populateLibraryMenu();

            appController = new AppController(rootContentItem.contentId, currentLocale, rootContentItem.version,
                                              TOCTreeView, workingDir);
        }
コード例 #2
0
ファイル: MainForm.cs プロジェクト: SamB/PackageThis
        private void reloadLibrary()
        {
            if (useWaitCursor) Cursor.Current = Cursors.WaitCursor;

            try
            {
                CleanUpTempDir();
                CreateTempDir();

                statusStrip1.Items.Clear();
                //statusStrip1.Items.Add(workingDir);
                statusStrip1.Items.Add(rootContentItem.name);

                TOCTreeView.BeginUpdate();
                TOCTreeView.Nodes.Clear();

                appController = new AppController(rootContentItem.contentId, currentLocale,
                    rootContentItem.version, TOCTreeView, workingDir);

                TOCTreeView.EndUpdate();

                if (ContentDataSet.Tables["ItemInstance"] != null)
                    ContentDataSet.Tables["ItemInstance"].Clear();

                if (ContentDataSet.Tables["Item"] != null)
                    ContentDataSet.Tables["Item"].Clear();

                if (ContentDataSet.Tables["Picture"] != null)
                    ContentDataSet.Tables["Picture"].Clear();
            }
            finally
            {
                if (useWaitCursor) Cursor.Current = Cursors.Default;
            }
        }
コード例 #3
0
ファイル: MainForm.cs プロジェクト: SamB/PackageThis
        private void MainForm_Load(object sender, EventArgs e)
        {
            try
            {
                this.Text = String.Format("Package This! - {0}", Assembly.GetExecutingAssembly().GetName().Version.ToString());

                // Unicode Start of String, chosen to avoid collisions possible with default sep
                // when we serialize the path to a file.
                TOCTreeView.PathSeparator = "\x0098";

                CreateTempDir();

                rootContentItem.currentLibrary = Properties.Settings.Default.currentLibrary;

                //statusStrip1.Items.Add(workingDir);
                statusStrip1.Items.Add(rootContentItem.name);

                SplashForm.Status("Connecting to server...");  //First time we hit the server (at least in Australia) we get a 15 sec delay
                populateLocaleMenu();

                SplashForm.Status("Downloading content...");
                populateLibraryMenu();

                appController = new AppController(rootContentItem.contentId, currentLocale, rootContentItem.version,
                    TOCTreeView, workingDir);

                //Give AppController Access to the UI
                debugEdit.WordWrap = false;
                appController._rtDebug = new RichTextBoxFuncs(debugEdit);
                appController._rtDebug.WriteLine("Exceptions will appear here. Please report an errors reported to CodePlex.", Color.Chocolate);
                appController._rtDebug.WriteLine("");
                appController._tabControl = tabControl1;
                appController._tabPage_Debug = tabPage_Debug;
                appController._tabPage_List = tabPage_List;
            }
            finally
            {
            }
        }