Esempio n. 1
0
        private void MessagesButton_Click(object sender, EventArgs e)
        {
            PhantomForm PhantomForm = new PhantomForm();

            PhantomForm.Show();

            MessagesForm MessagesForm = new MessagesForm(ref TopForm);

            TopForm = MessagesForm;

            Security.EnterInModule("MessagesForm");

            MessagesForm.ShowDialog();

            PhantomForm.Close();
            PhantomForm.Dispose();

            TopForm = null;

            if (InfiniumNotifyList.Items != null)
            {
                if (InfiniumNotifyList.Items.Count() > 0)
                {
                    ActiveNotifySystem.FillUpdates();
                    InfiniumNotifyList.ItemsDataTable = ActiveNotifySystem.ModulesUpdatesDataTable;
                    InfiniumNotifyList.InitializeItems();
                }
            }
        }
Esempio n. 2
0
        private void InfiniumMinimizeList_ItemClicked(object sender, string FormName)
        {
            if (FormName == "MessagesForm")
            {
                MessagesButton_Click(null, null);
                InfiniumMinimizeList.RemoveModule(FormName);
            }
            else
            {
                Thread T = new Thread(delegate() { SplashWindow.CreateSplash(); });
                T.Start();

                while (!SplashForm.bCreated)
                {
                    ;
                }

                Form ModuleForm = InfiniumMinimizeList.GetForm(FormName);
                TopForm = ModuleForm;
                ModuleForm.ShowDialog();
            }

            if (InfiniumNotifyList.Items != null)
            {
                if (InfiniumNotifyList.Items.Count() > 0)
                {
                    ActiveNotifySystem.FillUpdates();
                    InfiniumNotifyList.ItemsDataTable = ActiveNotifySystem.ModulesUpdatesDataTable;
                    InfiniumNotifyList.InitializeItems();
                }
            }
        }
Esempio n. 3
0
        private void InfiniumNotifyList_ItemClicked(object sender, string FormName)
        {
            if (FormName == "MessagesForm")
            {
                MessagesButton_Click(null, null);

                if (NotifyForm != null)
                {
                    NotifyForm.Close();
                    NotifyForm.Dispose();
                    NotifyForm = null;
                }

                ActiveNotifySystem.FillUpdates();
                InfiniumNotifyList.ItemsDataTable = ActiveNotifySystem.ModulesUpdatesDataTable;
                InfiniumNotifyList.InitializeItems();

                return;
            }

            Thread T = new Thread(delegate() { SplashWindow.CreateSplash(); });

            T.Start();

            while (!SplashForm.bCreated)
            {
                ;
            }


            if (NotifyForm != null)
            {
                NotifyForm.Close();
                NotifyForm.Dispose();
                NotifyForm = null;
            }

            Form ModuleForm = null;

            //check if running
            Form Form = InfiniumMinimizeList.GetForm(FormName);

            if (Form != null)
            {
                TopForm = Form;
                Form.ShowDialog();
            }
            else
            {
                Type CAType = Type.GetType("Infinium." + FormName);
                ModuleForm = (Form)Activator.CreateInstance(CAType, this);
                TopForm    = ModuleForm;
                ModuleForm.ShowDialog();
            }

            ActiveNotifySystem.FillUpdates();
            InfiniumNotifyList.ItemsDataTable = ActiveNotifySystem.ModulesUpdatesDataTable;
            InfiniumNotifyList.InitializeItems();
        }
Esempio n. 4
0
        public void StartModuleFromNotify(int ModuleID)
        {
            if (TopForm != null)
            {
                if (TopForm.Name == InfiniumStart.FullModulesDataTable.Select("ModuleID = " + ModuleID)[0]["FormName"].ToString())
                {
                    return;
                }
            }

            if (ModuleID != 80)
            {
                Thread T = new Thread(delegate() { SplashWindow.CreateSplash(); });
                T.Start();

                while (!SplashForm.bCreated)
                {
                    ;
                }
            }

            if (TopForm != null)
            {
                if (TopForm.Name != InfiniumStart.FullModulesDataTable.Select("ModuleID = " + ModuleID)[0]["FormName"].ToString())
                {
                    HideForm(TopForm);
                }
            }

            Form ModuleForm = null;

            if (ModuleID == 80)//messages
            {
                MessagesButton_Click(null, null);
            }
            else
            {
                //check if running
                Form Form = InfiniumMinimizeList.GetForm(InfiniumStart.FullModulesDataTable.Select("ModuleID = " + ModuleID)[0]["FormName"].ToString());
                if (Form != null)
                {
                    TopForm = Form;
                    Form.Show();
                }
                else
                {
                    Type CAType = Type.GetType("Infinium." + InfiniumStart.FullModulesDataTable.Select("ModuleID = " + ModuleID)[0]["FormName"].ToString());
                    ModuleForm = (Form)Activator.CreateInstance(CAType, this);
                    TopForm    = ModuleForm;
                    ModuleForm.ShowDialog();
                }
            }

            ActiveNotifySystem.FillUpdates();
            InfiniumNotifyList.ItemsDataTable = ActiveNotifySystem.ModulesUpdatesDataTable;
            InfiniumNotifyList.InitializeItems();
        }
Esempio n. 5
0
        private void PhotoBox_Click(object sender, EventArgs e)
        {
            Thread T = new Thread(delegate() { SplashWindow.CreateSplash(); });

            T.Start();

            while (!SplashForm.bCreated)
            {
                ;
            }

            Form ModuleForm = null;

            //check if running
            Form Form = InfiniumMinimizeList.GetForm("PersonalSettingsForm");

            if (Form != null)
            {
                TopForm = Form;
                Form.ShowDialog();
            }
            else
            {
                Type CAType = Type.GetType("Infinium." + "PersonalSettingsForm");
                ModuleForm = (Form)Activator.CreateInstance(CAType, this);
                TopForm    = ModuleForm;
                Security.EnterInModule("PersonalSettingsForm");
                ModuleForm.ShowDialog();
            }

            if (InfiniumNotifyList.Items != null)
            {
                if (InfiniumNotifyList.Items.Count() > 0)
                {
                    ActiveNotifySystem.FillUpdates();
                    InfiniumNotifyList.ItemsDataTable = ActiveNotifySystem.ModulesUpdatesDataTable;
                    InfiniumNotifyList.InitializeItems();
                }
            }
        }
Esempio n. 6
0
        private void FuckingNotify()
        {
            //try
            //{
            InfiniumNotifyList.ItemsDataTable = ActiveNotifySystem.ModulesUpdatesDataTable;
            InfiniumNotifyList.InitializeItems();

            if (TopForm != null)
            {
                if (TopForm.Name == "MessagesForm")
                {
                    using (Stream str = Properties.Resources.MESSAGENOTIFY)
                    {
                        using (SoundPlayer snd = new SoundPlayer(str))
                        {
                            snd.Play();
                        }
                    }
                }
                else
                {
                    using (Stream str = Properties.Resources._01_01)
                    {
                        using (SoundPlayer snd = new SoundPlayer(str))
                        {
                            snd.Play();
                        }
                    }
                }
            }
            else
            {
                using (Stream str = Properties.Resources._01_01)
                {
                    using (SoundPlayer snd = new SoundPlayer(str))
                    {
                        snd.Play();
                    }
                }
            }



            //если открытый модуль типа InfiniumForm
            if (TopForm != null)
            {
                if (TopForm.GetType().BaseType.Name == "InfiniumForm")
                {
                    ((InfiniumForm)TopForm).OnANSUpdate();
                }
            }

            if (TopForm != null)
            {
                if (ActiveNotifySystem.ModulesDataTable.Select("ModuleID = " + ActiveNotifySystem.iCurrentModuleID)[0]["FormName"].ToString() == TopForm.Name)
                {
                    if (GetActiveWindow() == TopForm.Handle)
                    {
                        return;
                    }
                }
            }

            if (GetActiveWindow() == Handle)//только звук
            {
                return;
            }

            //показываем всплывающее окно
            if (NotifyForm.bShowed == true)
            {
                if (NotifyForm != null)
                {
                    NotifyForm.Close();
                }

                int ModuleID  = 0;
                int MoreCount = 0;
                int Count     = ActiveNotifySystem.GetLastModuleUpdate(ref ModuleID, ref MoreCount);
                NotifyForm = new NotifyForm(this, ref ActiveNotifySystem, ModuleID, Count, MoreCount);
                NotifyForm.Show();
            }
            else
            {
                int ModuleID  = 0;
                int MoreCount = 0;
                int Count     = ActiveNotifySystem.GetLastModuleUpdate(ref ModuleID, ref MoreCount);
                NotifyForm = new NotifyForm(this, ref ActiveNotifySystem, ModuleID, Count, MoreCount);
                NotifyForm.Show();
            }
            //}
            //catch (Exception e)
            //{
            //    MessageBox.Show(e.Message);
            //}
        }