Example #1
0
    /// <summary>
    /// 武器のボタン一覧を作る初期化メソッド
    /// </summary>
    /// <param name="shopManager"></param>
    public void initWeaponList(ShopManager shopManager, WeaponDatabase weaponDatabase,
                               DetailWindow detailWindow)
    {
        foreach (var weapon in weaponDatabase.weaponList)
        {
            //非売品は表示しない
            if (weapon.isNfs)
            {
                continue;
            }
            //Resources配下からボタンをロード
            var itemButton = (Instantiate(Resources.Load("Prefabs/WeaponButton")) as GameObject).transform;
            //ボタン初期化 今はテキストのみ
            itemButton.GetComponent <WeaponButton>().Init(weapon, shopManager, detailWindow);
            itemButton.name = itemButton.name.Replace("(Clone)", "");

            //partyWindowオブジェクトをを探して取得
            buyWindow = GameObject.Find("BuyWindow");
            content   = GameObject.Find("Viewport/Content");



            //partyWindowオブジェクト配下にprefab作成
            itemButton.transform.SetParent(content.transform);
        }
        //非表示にする
        buyWindow.SetActive(false);
    }
Example #2
0
    protected void Cell_Click(object sender, AjaxEventArgs e)
    {
        if (dfBegin.SelectedDate > dfEnd.SelectedDate)
        {
            Ext.Msg.Alert("提示", "日期选择有误!").Show();
            return;
        }
        CellSelectionModel sm = this.GridPanel1.SelectionModel.Primary as CellSelectionModel;

        if (sm.SelectedCell.Value.Trim() == "0")
        {
            return;
        }
        if (sm.SelectedCell.Name.Trim() == "SMScount")
        {
            var data = from t in dc.TblSmsendtask
                       from p in dc.Person
                       where t.Destaddr == p.Tel &&
                       t.Subtime >= dfBegin.SelectedDate && t.Subtime <= dfEnd.SelectedDate &&
                       p.Maindeptid == sm.SelectedCell.RecordID.Trim()
                       select new
            {
                t.Smsid,
                t.SmContent,
                t.Sendtime,
                p.Name
            };
            DetailStore.DataSource = data.OrderByDescending(p => p.Sendtime);
            DetailStore.DataBind();

            DetailWindow.Show();
        }
    }
        public void ShowDetailWindow(int lscId, string projectId)
        {
            try {
                var lsc = new BLsc().GetLsc(lscId);
                if (lsc == null)
                {
                    WebUtility.ShowMessage(EnmErrType.Warning, "无法获取Lsc信息");
                    return;
                }

                var connectionString = WebUtility.CreateLscConnectionString(lsc);
                var project          = new BAppointment().GetProject(lsc.LscID, lsc.LscName, projectId, connectionString);
                if (project == null)
                {
                    WebUtility.ShowMessage(EnmErrType.Warning, "无法获取工程信息");
                    return;
                }

                ProjectIdField.Text   = project.ProjectId;
                ProjNameField.Text    = project.ProjectName;
                StartTimeField.Text   = WebUtility.GetDateString(project.BeginTime);
                EndTimeField.Text     = WebUtility.GetDateString(project.EndTime);
                ResponsibleField.Text = project.Responsible;
                PhoneField.Text       = project.ContactPhone;
                CompanyField.Text     = project.Company;
                CommentField.Text     = project.Comment;
                EnabledField.Text     = WebUtility.GetBooleanName(project.Enabled);
                DetailWindow.Show();
            } catch (Exception err) {
                WebUtility.WriteLog(EnmSysLogLevel.Error, EnmSysLogType.Exception, err.ToString(), Page.User.Identity.Name);
                WebUtility.ShowMessage(EnmErrType.Error, err.Message);
            }
        }
Example #4
0
        public void Details()
        {
            DetailWindow dw = new DetailWindow();

            dw.DataContext = this;

            dw.Show();
        }
Example #5
0
 private void lboxSqidukid_MouseDoubleClick(object sender, System.Windows.Input.MouseButtonEventArgs e)
 {
     if (lboxSqidukid.SelectedItem != null)
     {
         var uusdetailaken = new DetailWindow();
         uusdetailaken.Show();
     }
 }
        public void DetailWindowConstructorTest()
        {
            IProjectNotesService  service               = new ProjectNotesServiceMock(4);
            IProjectNote          projectNote           = service.ProjectNotes[2];
            DetailWindowViewModel detailWindowViewModel = new DetailWindowViewModel(service, projectNote);
            DetailWindow          target = new DetailWindow(detailWindowViewModel);

            Assert.AreSame(target.DataContext, detailWindowViewModel);
        }
        public void ShowUpdateGroup()
        {
            DetailWindow    detailWindow = new DetailWindow("Update group");
            IDetailWindow   detail       = detailWindow;
            List <GroupDto> groups       = (List <GroupDto>)mainWindow.GroupData;

            detail.DetailName = groups[mainWindow.SelectIndexGroup].Name;
            detail.Desciption = groups[mainWindow.SelectIndexGroup].Description;
            detail.Id         = groups[mainWindow.SelectIndexGroup].Id;
            detailWindow.ShowDialog();
        }
        public void ShowUpdateEvent()
        {
            DetailWindow    detailWindow = new DetailWindow("Update event");
            IDetailWindow   detail       = detailWindow;
            List <EventDto> events       = (List <EventDto>)mainWindow.EventData;

            detail.DetailName = events[mainWindow.SelectIndexEvent].Name;
            detail.Desciption = events[mainWindow.SelectIndexEvent].Description;
            detail.Id         = events[mainWindow.SelectIndexEvent].Id;
            detailWindow.ShowDialog();
        }
Example #9
0
        private void DataGridRow_DoubleClick(object sender, MouseButtonEventArgs e)
        {
            this.Hide();
            DataGrid     dataGrid     = sender as DataGrid;
            var          email        = (Email)dataGrid.SelectedItem;
            DetailWindow detailWindow = new DetailWindow(email);

            detailWindow.ShowDialog();
            _vm.SetEmailSeen(email.UId);
            this.Show();
        }
Example #10
0
        private DetailWindow CreateDetailWindow(IBackupFileService backupFileService, string filePath)
        {
            var window    = new DetailWindow();
            var viewModel = (DetailViewModel)window.DataContext;

            viewModel.FilePath   = filePath;
            viewModel.BackupFile = backupFileService.Load(filePath);

            window.Closed += DetailWindowClosed;
            _detailWindows.Add(window);
            return(window);
        }
Example #11
0
    //文字からアイテムを取得して返すメソッドを作る


    /// <summary>
    /// 売却用のウィンドウを手持ち武器から初期化する
    /// </summary>
    /// <param name="shopManager"></param>
    /// <param name="weaponDatabase"></param>
    /// <param name="detailWindow"></param>
    public void initSaleWeaponList(ShopManager shopManager, List <Weapon> weaponList,
                                   DetailWindow detailWindow)
    {
        foreach (var weapon in weaponList)
        {
            //Resources配下からボタンをロード
            var itemButton = (Instantiate(Resources.Load("Prefabs/WeaponButton")) as GameObject).transform;
            //ボタン初期化 今はテキストのみ
            itemButton.GetComponent <WeaponButton>().Init(weapon, shopManager, detailWindow);
            itemButton.name = itemButton.name.Replace("(Clone)", "");

            //partyWindowオブジェクト配下にprefab作成
            itemButton.transform.SetParent(saleContent.transform);
        }
    }
Example #12
0
        private void dgvAnimeList_MouseDoubleClick(object sender, MouseButtonEventArgs e)
        {
            var row = ItemsControl.ContainerFromElement((DataGrid)sender,
                                                        e.OriginalSource as DependencyObject) as DataGridRow;

            if (row == null)
            {
                return;
            }
            Anime anim         = (Anime)dgvAnimeList.CurrentItem;
            var   detailWindow = new DetailWindow();

            detailWindow.pkgID = anim.package_anim;
            detailWindow.ShowDialog();
        }
Example #13
0
    //初期化メソッド
    public void Init(Weapon weapon, ShopManager shopManager, DetailWindow detailWindow)
    {
        //配下の名前、回数、値段を設定
        weaponNameText.text = weapon.name;
        enduranceText.text  = string.Format("{0}/{1}", weapon.endurance.ToString(), weapon.endurance.ToString());

        priceText.text = string.Format("{0}円", weapon.price.ToString());

        //選択時の詳細表示用に持たせておく IDからアセットの値を取得した方が良い?
        this.Weapon = weapon;

        //Prefubは自分配下以外は[SerializeField]出来ないので、
        //初期化時にインスタンスを渡して貰う
        this.shopManager  = shopManager;
        this.detailWindow = detailWindow;
    }
Example #14
0
    public void DetailShow()
    {
        RowSelectionModel sm    = gpEdit.SelectionModel.Primary as RowSelectionModel;
        string            perid = sm.SelectedRow.RecordID;

        //var data =
        //    (from yh in dc.Nyhinput
        //     from yc in dc.Nyinhuancheck
        //     from y in dc.Yhbase
        //     where yh.Yhputinid == yc.Yhputinid && yh.Yhid == y.Yhid && yc.Responsibleid == perid
        //     select new
        //     {
        //         Content = y.Yhcontent,
        //         yh.Pctime,
        //         Kind = "yh"
        //     }).Union(
        //     from sw in dc.Nswinput
        //     from s in dc.Swbase
        //     where sw.Swid == s.Swid && sw.Swpersonid == perid
        //     select new
        //     {
        //         Content = s.Swcontent,
        //         sw.Pctime,
        //         Kind = "sw"
        //     }).Union(
        //     from z in dc.Moveplan
        //     from d in dc.Place
        //     where z.Personid == perid && z.Placeid==d.Placeid
        //     select new
        //     {
        //         Content=d.Placename+",走动情况:"+z.Movestate,
        //         Pctime = z.Starttime,
        //         Kind = "zd"
        //     }).Union(
        //     from g in dc.Workinjury
        //     where g.Personnumber == perid
        //     select new
        //     {
        //         Content=g.GsFact,
        //         Pctime = g.Indate,
        //         Kind = "gs"
        //     });
        //data = data.Where(p => p.Pctime >= new DateTime(System.DateTime.Today.Year, 1, 1));
        DetailStore.DataSource = GetUserLoginDetail(new DateTime(System.DateTime.Today.Year, 1, 1), System.DateTime.Today, perid);
        DetailStore.DataBind();
        DetailWindow.Show();
    }
Example #15
0
        /// <summary>
        /// Focuses an already existing or otherwise new DetailWindow for <paramref name="printer"/>.
        /// </summary>
        /// <param name="printer">The printer to show a DetailWindow for.</param>
        public static void ShowOrFocus(Printer printer)
        {
            //Get the first window with a DetailWindow-style title.
            var window = FirstWindow <DetailWindow>($"{printer.IpAddress} - Printer Details");

            //If a window was found, focus it.
            if (window != null)
            {
                window.Focus();
            }
            //Otherwise:
            else
            {
                //Create a new DetailWindow for the printer.
                window = new DetailWindow(printer);
                //Show the window.
                window.Show();
            }
        }
Example #16
0
    public void PlanLoad()
    {
        RowSelectionModel sm = this.GridPanel1.SelectionModel.Primary as RowSelectionModel;

        if (sm.SelectedRows.Count > 0)
        {
            var ct = dc.YChargetable.First(p => p.Id == int.Parse(sm.SelectedRecordID));
            if (ct.Cdate.Value < System.DateTime.Today || SessionBox.GetUserSession().rolelevel.Contains("1") || SessionBox.GetUserSession().rolelevel.Contains("0"))
            {
                tb2.Hidden = true;
            }
            else
            {
                tb2.Hidden           = false;
                btnPlaceAdd.Disabled = false;
                lblDetail.Text       = "带班人员:" + dc.Person.First(p => p.Personnumber == ct.Cperson).Name + ";带班班次:" + ct.Cdate.Value.ToString("yyyy-MM-dd") + ct.Cbanci;
            }
            PlanPlaceStoreLoad(Decimal.Parse(sm.SelectedRecordID));
            DetailWindow.Show();
        }
    }
Example #17
0
        private void ViewDetails(object sender, RoutedEventArgs e)
        {
            MessageBoxButton btn = MessageBoxButton.OK;
            //var item = ViewModel.DG1_ItemSource.Where(p => p.IsSelected).FirstOrDefault();
            //if (item is null)
            //{
            //    item = DG1.SelectedItem as MailQueueViewModel;
            //}
            var    item = DG1.SelectedItem as MailQueueViewModel;
            string msg  = item.Details;

            if (msg.Split('\n').Count() > 35)
            {
                DetailWindow detailWindow = new DetailWindow();
                detailWindow.Message.Text = msg;
                detailWindow.ShowDialog();
            }
            else
            {
                ModernDialog.ShowMessage(msg, "详情一览", btn);
            }
        }
Example #18
0
    public void RouteMan()
    {
        RowSelectionModel sm = this.GridPanel1.SelectionModel.Primary as RowSelectionModel;

        if (sm.SelectedRows.Count > 0)
        {
            HBBLL hb = new HBBLL();
            TID.SetValue(sm.SelectedRows[0].RecordID.Trim());
            TID.Value = sm.SelectedRows[0].RecordID.Trim();
            TID.Text  = sm.SelectedRows[0].RecordID.Trim();

            string id = TID.Value.ToString();
            id             = TID.Text;
            lblDetail.Text = hb.GetYPPTNameByID(int.Parse(id));

            DetailWindow.Show();
            UpdateStatus1();
            Ext.DoScript("#{YPPTDetailStore}.reload();");
        }
        else
        {
            Ext.Msg.Alert("提示", "请选择一个模板!").Show();
        }
    }
        public PopWindow()
        {
            InitializeComponent();
            Me                 = this;
            _trayIcon          = Control.TrayIcon.GetInstance();
            _trayIcon.Invoked += TrayIcon_Invoked;


            //G1.Background = null;



            // Move keyboard focus to the first element. Disabled this since it is ugly but not sure invisible
            // visuals are preferrable.
            // Activated += (s,e) => MoveFocus(new TraversalRequest(FocusNavigationDirection.First));

            SourceInitialized += (s, e) => UpdateTheme();
            InitializeTimer();
            R2.Height   = new GridLength(1, GridUnitType.Auto);
            R1.Height   = new GridLength(0);
            R0.Height   = new GridLength(0);
            Arrow1.Fill = this.Foreground;
            Arrow2.Fill = this.Foreground;

            var t = Program.ReadSetting("TopWindows", "0");

            if (t == "1")
            {
                this.Topmost = true;
            }
            else
            {
                this.Topmost = false;
            }
            var c = Program.ReadSetting("Chart", "0");

            if (c == "1")
            {
                Chart(true);
            }
            else
            {
                Chart(false);
            }
            var m = Program.ReadSetting("Max", "1");

            if (m == "1")
            {
                Max(true);
            }
            else
            {
                Max(false);
            }
            var h = Program.ReadSetting("Hiden", "0");

            if (h == "1")
            {
                CreateAndHideWindow();
            }
            else
            {
                CreateAndShowWindow();
            }
            double temp = MaxDownload;

            _           = double.TryParse(Program.ReadSetting("MaxDownload", "0"), out temp);
            MaxDownload = temp;
            SetMaxDownload(MaxDownload);
            //
            detailWindow = new DetailWindow(this);
            detailWindow.IsVisibleChanged += DetailWindow_IsVisibleChanged;
            var menu = new System.Windows.Controls.ContextMenu
            {
                ItemsSource = _trayIcon.BuildContextMenu(false).Items
            };

            //this.ContextMenu = menu;
            App.Pin(this);
        }
        public void ShowAddGroup()
        {
            DetailWindow detailWindow = new DetailWindow("Add group");

            detailWindow.ShowDialog();
        }