Exemple #1
0
 protected override void WndProc(ref Message m)
 {
     base.WndProc(ref m);
     if (SystemMenu.GetSysMenuId(m) == 3)
     {
         WindowState = FormWindowState.Normal;
         Bounds      = new Rectangle(100, 100, 300, 300);
     }
 }
Exemple #2
0
        public FormMasterData(ImageList slotItemImageList)
        {
            InitializeComponent();
            lvShip.ListViewItemSorter     = Comparer <MasterData.Ship.ShipMasterLVItem> .Default;
            lvSlotItem.ListViewItemSorter = Comparer <MasterData.Item.SlotItemMasterLVItem> .Default;
            lvSType.ListViewItemSorter    = Comparer <MasterData.Ship.ShipTypeLVItem> .Default;
            lvSlotItem.SmallImageList     = slotItemImageList;

            var sm = new SystemMenu(this);

            sm.InsertMenuItem(2, "ウィンドウ復帰", 6);
        }
Exemple #3
0
        public FormSlotItemList(ImageList iconImageList)
        {
            InitializeComponent();

            lvSlotItemList.DoubleBuffer(true);
            lvSlotItemList.ListViewItemSorter = Comparer <SlotItemLVItem> .Default;
            lvSlotItemList.LoadColumnWithOrder(Properties.Settings.Default.SlotItemListColumnWidth);
            if (!Properties.Settings.Default.SlotItemListBounds.IsEmpty)
            {
                Bounds = Properties.Settings.Default.SlotItemListBounds;
            }

            lvSlotItemList.SmallImageList = iconImageList;

            var sm = new SystemMenu(this);

            sm.InsertMenuItem(5, "ウィンドウ復帰", 6);
        }
Exemple #4
0
        public FormLog(LogManager.LogManager logManager)
        {
            InitializeComponent();
            //非表示でもウィンドウハンドルを生成させる。さもなくば、Invokeが失敗する
            IntPtr wndHandle = Handle;

            lvBattle.DoubleBuffer(true);
            lvItem.DoubleBuffer(true);
            lvMaterials.DoubleBuffer(true);
            lvMission.DoubleBuffer(true);
            lvShip.DoubleBuffer(true);

            chartMaterial.DataSource = logManager.InitMaterialDataTable();
            chartMaterial.DataBind();

            /* フォームは開かれていないのでLoadは呼ばれないが、
             * フォームが開かれる前にログ追加が行われるとデータの順番が腐る
             */

            if (!Properties.Settings.Default.LogFormBounds.IsEmpty)
            {
                Bounds = Properties.Settings.Default.LogFormBounds;
            }

            lvBattle.LoadColumnWithOrder(Properties.Settings.Default.LogBattleColumnWidth);
            lvItem.LoadColumnWithOrder(Properties.Settings.Default.LogItemColumnWidth);
            lvMaterials.LoadColumnWithOrder(Properties.Settings.Default.LogMaterialColumnWidth);
            lvMission.LoadColumnWithOrder(Properties.Settings.Default.LogMissionColumnWidth);
            lvShip.LoadColumnWithOrder(Properties.Settings.Default.LogShipColumnWidth);

            logManager.AttachLogControls(lvShip, lvItem, lvBattle, lvMission, lvMaterials, chartMaterial, this);
            _logManager = logManager;

            Text += string.Format("(Store:{0})", logManager.LogStore.StoreType);

            var sm = new SystemMenu(this);

            sm.InsertMenuItem(3, "ウィンドウ復帰", 6);
        }
Exemple #5
0
        public FormItemList(ImageList iconImageList)
        {
            InitializeComponent();
            //ウィンドウハンドルを生成しないと、Invokeで死ぬ
            IntPtr dummyHandle = Handle;

            lvItemList.DoubleBuffer(true);
            ItemListViewItem.InitializeColumn(lvItemList);

            lvItemList.ListViewItemSorter = Comparer <ItemListViewItem> .Default;
            lvItemList.LoadColumnWithOrder(Properties.Settings.Default.ItemListColumnWidth);

            if (!Properties.Settings.Default.ItemListBounds.IsEmpty)
            {
                Bounds = Properties.Settings.Default.ItemListBounds;
            }

            lvItemList.SmallImageList = iconImageList;
            var sm = new SystemMenu(this);

            sm.InsertMenuItem(4, "ウィンドウ復帰", 6);
        }
Exemple #6
0
        public FormShipList(ImageList ilSlotItem)
        {
            _ilSlotItem = ilSlotItem;
            InitializeComponent();
            lvShipList.DoubleBuffer(true);
            //ウィンドウハンドルを生成しないと、Invokeで死ぬ
            IntPtr dummyHandle = Handle;

            ShipListViewItem.InitializeColumn(lvShipList);

            lvShipList.ListViewItemSorter = Comparer <ShipListViewItem> .Default;
            lvShipList.LoadColumnWithOrder(Properties.Settings.Default.ShipListColumnWidth);

            if (!Properties.Settings.Default.ShipListBounds.IsEmpty)
            {
                Bounds = Properties.Settings.Default.ShipListBounds;
            }

            var sm = new SystemMenu(this);

            sm.InsertMenuItem(1, "ウィンドウ復帰", 6);
        }