Esempio n. 1
0
        public static void CrashProcedure(Exception e)
        {
            StreamWriter crashLog = new StreamWriter("crash.txt", true);

            crashLog.WriteLine(e.ToString());
            crashLog.Close();

            Console.WriteLine("Editor crash: " + e.ToString() + "\n");
            MessageBox.Show("ѕроизошел непредвиденный сбой в работе редактора.\n—ейчас произойдет завершение работы клиента (если запущен),\n и будет предложено сохранить изменени¤ (если есть).", "—бой", MessageBoxButtons.OK, MessageBoxIcon.Error);

            try
            {
                if (ClientLoader.m_clientProcess != null)
                {
                    if (ClientLoader.m_clientProcess.HasExited == false)
                    {
                        ClientLoader.m_clientProcess.Kill();
                    }
                }
            }
            catch (System.ComponentModel.Win32Exception w)
            {
                Console.WriteLine("Can't close client: " + w.Message);
            }

            ClientMySQL mySql = new ClientMySQL();

            HistoryProcessor.GetHProcessor().ProcessHistory(mySql, true);
        }
Esempio n. 2
0
        public GroupForm()
        {
            groupId = -1;
            InitializeComponent();

            m_mySql = new ClientMySQL();
            m_mySql.Connect();
            m_commander = Commander.GetCommander();
            point       = new Vector();
            m_storage   = HistoryProcessor.GetHProcessor();
        }
Esempio n. 3
0
        public Material()
        {
            m_objectName = null;

            m_resPaths = null;

            m_texturesList  = null;
            m_templatesList = null;
            m_templateItems = null;

            m_mySql = new ClientMySQL();
            m_mySql.Connect();

            m_translates = new Translate(m_templateDir + "/");

            if (saveMaterialThread == null)
            {
                saveMaterialThread = new Thread(new ThreadStart(ShowSaveMaterialWnd));
                saveMaterialThread.Start();
            }
        }