コード例 #1
0
ファイル: Manager.cs プロジェクト: rambo-long/lua-tilde
        public bool LoadProject(string fileName)
        {
            if (mProject != null && !CloseProject(false))
            {
                return(false);
            }

            Type projType = FindProjectLoader(fileName);

            if (projType == null)
            {
                throw new ApplicationException("Couldn't find loader for project: " + fileName);
            }

            mProject = (Project)Activator.CreateInstance(projType, new object[] { this, fileName });

            if (mProject.VCSType == "")
            {
                if (MessageBoxEx.Show(MainWindow, "Source control has not been configured for this project. Would you like to configure it now?", "Source control configuration", new string [] { "Yes", "No" }, MessageBoxIcon.Question, "Yes") == "Yes")
                {
                    SourceControlWindow window = new SourceControlWindow(this);
                    window.ShowDialog(MainWindow);
                }
            }

            try
            {
                // Plugins might fail here
                OnProjectOpened();
                OnPropertyChange(this, "Project", null, mProject);
            }
            catch (System.Exception e)
            {
                DestroyProject();
                throw e;
            }
            return(true);
        }
コード例 #2
0
ファイル: Manager.cs プロジェクト: zcnet4/lua-tilde
		public bool LoadProject(string fileName)
		{
			if (mProject != null && !CloseProject(false))
				return false;

			Type projType = FindProjectLoader(fileName);

			if (projType == null)
				throw new ApplicationException("Couldn't find loader for project: " + fileName);

			mProject = (Project)Activator.CreateInstance(projType, new object[] { this, fileName });

			if(mProject.VCSType == "")
			{
				if(MessageBoxEx.Show(MainWindow, "Source control has not been configured for this project. Would you like to configure it now?", "Source control configuration", new string [] {"Yes", "No"}, MessageBoxIcon.Question, "Yes" ) == "Yes")
				{
					SourceControlWindow window = new SourceControlWindow(this);
					window.ShowDialog(MainWindow);
				}
			}

			try
			{
				// Plugins might fail here
				OnProjectOpened();
				OnPropertyChange(this, "Project", null, mProject);
			}
			catch (System.Exception e)
			{
				DestroyProject();
				throw e;
			}
			return true;
		}
コード例 #3
0
ファイル: MainWindow.cs プロジェクト: zcnet4/lua-tilde
		private void sourceControlToolStripMenuItem_Click(object sender, EventArgs e)
		{
			SourceControlWindow window = new SourceControlWindow(Manager);
			window.ShowDialog(this);
		}
コード例 #4
0
ファイル: MainWindow.cs プロジェクト: rambo-long/lua-tilde
        private void sourceControlToolStripMenuItem_Click(object sender, EventArgs e)
        {
            SourceControlWindow window = new SourceControlWindow(Manager);

            window.ShowDialog(this);
        }