예제 #1
0
        private void ChooseHoroscopeControl_Load(object sender, System.EventArgs e)
        {
            MhoraContainer mc = (MhoraContainer)MhoraGlobalOptions.mainControl;

            foreach (Form c in mc.MdiChildren)
            {
                if (c is MhoraChild)
                {
                    lBox.Items.Add(((MhoraChild)c).Name);
                }
            }
            if (lBox.Items.Count > 0)
            {
                lBox.SelectedIndex = 0;
            }
        }
예제 #2
0
        public string GetHoroscopeName()
        {
            if (lBox.SelectedIndex < 0)
            {
                return(null);
            }

            MhoraContainer mc = (MhoraContainer)MhoraGlobalOptions.mainControl;

            foreach (Form c in mc.MdiChildren)
            {
                if (c is MhoraChild)
                {
                    if (((MhoraChild)c).Name == (string)lBox.Items[lBox.SelectedIndex])
                    {
                        return(((MhoraChild)c).Name);
                    }
                }
            }
            return(null);
        }