public DevelopWin(NuPz_Win pGNP00win)
        {
            InitializeComponent();
            GNPXGNPX.Content          = "GNPX " + DateTime.Now.Year;
            this.MouseLeftButtonDown += (sender, e) => this.DragMove();

            SuperLinkMan.devWin = this;
            this.pGNP00win      = pGNP00win;

            SDKGrp   = new GNPZ_Graphics(pGNP00win.GNP00);
            bmpGZero = new RenderTargetBitmap((int)dev_GBoard.Width, (int)dev_GBoard.Height, 96, 96, PixelFormats.Default);
        }
Beispiel #2
0
        public void SDK_PrintDocument(GNPXApp000 GNP00, int mLow, int mHigh, int mStart, int mEnd, bool SortF /*, colorList crList*/)
        {
            this.pGNP00win = GNP00.pGNP00win;
            GNPZ_Graphics SDKGrp = new GNPZ_Graphics(GNP00);
            int           lvl;

            List <UPuzzle> SDKPList = new List <UPuzzle>();

            foreach (var P in GNP00.SDKProbLst)
            {
                lvl = P.DifLevel;
                int n = P.ID;
                if (lvl < mLow || lvl > mHigh || n < mStart || n > mEnd)
                {
                    continue;
                }
                SDKPList.Add(P);
            }
            if (SortF)
            {
                SDKPList.Sort((pa, pb) => (pa.DifLevel - pb.DifLevel));
            }

            WrapPanel WrapPan = new WrapPanel();

            WrapPan.Width = 800;

            //【TBD】Printing of multiple pages can not be controlled。
            var    m_PrtDlg  = new PrintDialog();
            double GrdWidth  = (m_PrtDlg.PrintableAreaWidth - 48.0 * 2) / 2.0;
            double GrdHeight = (m_PrtDlg.PrintableAreaHeight - 48.0 * 2) / 2.0;

            foreach (UPuzzle P in SDKPList)
            {
                try{
                    Grid Grd = new Grid( );
                    Grd.Width  = GrdWidth;
                    Grd.Height = GrdHeight;

                    Label Lblname = new Label();
                    Lblname.Content  = "[" + P.ID + "]  " + P.Name;
                    Lblname.FontSize = 16;
                    Lblname.Margin   = new Thickness();
                    Grd.Children.Add(Lblname);

                    Label Lbldif = new Label();
                    Lbldif.Content             = "Dif:" + P.DifLevel;
                    Lbldif.FontSize            = 14;
                    Lbldif.HorizontalAlignment = HorizontalAlignment.Right;
                    Lbldif.VerticalAlignment   = VerticalAlignment.Top;
                    Lbldif.Margin = new Thickness(0, 10, 8, 0);
                    Grd.Children.Add(Lbldif);

                    var drwVis = new RenderTargetBitmap(338, 338, 96, 96, PixelFormats.Default); //338
                    SDKGrp.GBoardPaintPrint(drwVis, P);
                    Image Img = new Image();
                    Img.Source = drwVis;
                    Img.Margin = new Thickness(0, 35, 10, 0);
                    Img.HorizontalAlignment = HorizontalAlignment.Left;
                    Img.VerticalAlignment   = VerticalAlignment.Top;
                    Grd.Children.Add(Img);

                    WrapPan.Children.Add(Grd);
                }
                catch (Exception ex) {
                    WriteLine(ex.Message);
                    WriteLine(ex.StackTrace);
                }
            }

            VisualPrintDialog printDlg = new VisualPrintDialog(WrapPan);

            printDlg.ShowDialog();
        }
Beispiel #3
0
        public NuPz_Win()
        {
            try{
                GNPXApp000.pixelsPerDip = VisualTreeHelper.GetDpi(this).PixelsPerDip;

                GNP00  = new GNPXApp000(this);
                SDKGrp = new GNPZ_Graphics(GNP00);

                devWin = new DevelopWin(this);
                GroupedLinkGen.devWin = devWin;

                InitializeComponent();

                LbShortMes.Visibility                 = Visibility.Hidden;
                cmbLanguageLst.ItemsSource            = GNP00.LanguageLst;
                lblCurrentnDifficultyLevel.Visibility = Visibility.Hidden;

                GNPX_AnalyzerMan.Send_Solved += MultiSolved;

                GNPXGNPX.Content = "GNPX " + DateTime.Now.Year;

                //RadioButton Controls Collection
                var rdbLst = GNPZExtender.GetControlsCollection <RadioButton>(this);
                patSelLst         = rdbLst.FindAll(p => p.Name.Contains("patSel"));
                rdbVideoCameraLst = rdbLst.FindAll(p => p.Name.Contains("rdbCam"));

                #region Timer
                AnalyzerLap = new Stopwatch();

                timerShortMessage          = new DispatcherTimer(DispatcherPriority.Normal);
                timerShortMessage.Interval = TimeSpan.FromMilliseconds(50);
                timerShortMessage.Tick    += new EventHandler(timerShortMessage_Tick);

                startingTimer          = new DispatcherTimer(DispatcherPriority.Normal, this.Dispatcher);
                startingTimer.Interval = TimeSpan.FromMilliseconds(70);
                startingTimer.Tick    += new EventHandler(startingTimer_Tick);
                this.Opacity           = 0.0;
                startingTimer.Start();

                endingTimer          = new DispatcherTimer(DispatcherPriority.Normal, this.Dispatcher);
                endingTimer.Interval = TimeSpan.FromMilliseconds(70);
                endingTimer.Tick    += new EventHandler(endingTimer_Tick);

                displayTimer          = new DispatcherTimer(DispatcherPriority.Normal, this.Dispatcher);
                displayTimer.Interval = TimeSpan.FromMilliseconds(100);//50
                displayTimer.Tick    += new EventHandler(displayTimer_Tick);

                bruMoveTimer          = new DispatcherTimer(DispatcherPriority.Normal, this.Dispatcher);
                bruMoveTimer.Interval = TimeSpan.FromMilliseconds(20);
                bruMoveTimer.Tick    += new EventHandler(bruMoveTimer_Tick);
                #endregion Timer

                bmpGZero = new RenderTargetBitmap((int)PB_GBoard.Width, (int)PB_GBoard.Height, 96, 96, PixelFormats.Default);
                SDKGrp.GBoardPaint(bmpGZero, (new UPuzzle()).BDL, "tabACreate");
                PB_GBoard.Source = bmpGZero;    //◆Initial setting

                lblProcessorCount.Content = "ProcessorCount:" + Environment.ProcessorCount;

                #region Copyright
                string endl = "\r";
                string st   = "【著作権】" + endl;
                st += "本ソフトウエアと付属文書に関する著作権は、作者GNPX に帰属します。" + endl;
                st += "本ソフトウエアは著作権法及び国際著作権条約により保護されています。" + endl;
                st += "使用ユーザは本ソフトウエアに付された権利表示を除去、改変してはいけません" + endl + endl;

                st += "【配布】" + endl;
                st += "インターネット上での二次配布、紹介等は事前の承諾なしで行ってかまいません。";
                st += "バージョンアップした場合等には、情報の更新をお願いします。" + endl;
                st += "雑誌・書籍等に収録・頒布する場合には、事前に作者の承諾が必要です。" + endl + endl;

                st += "【禁止事項】" + endl;
                st += "以下のことは禁止します。" + endl;
                st += "・オリジナル以外の形で、他の人に配布すること" + endl;
                st += "・第三者に対して本ソフトウエアを販売すること" + endl;
                st += "・販売を目的とした宣伝・営業・複製を行うこと" + endl;
                st += "・第三者に対して本ソフトウエアの使用権を譲渡・再承諾すること" + endl;
                st += "・本ソフトウエアに対してリバースエンジニアリングを行うこと" + endl;
                st += "・本承諾書、付属文書、本ソフトウエアの一部または全部を改変・除去すること" + endl + endl;

                st         += "【免責事項】" + endl;
                st         += "作者は、本ソフトウエアの使用または使用不能から生じるコンピュータの故障、情報の喪失、";
                st         += "その他あらゆる直接的及び間接的被害に対して一切の責任を負いません。" + endl;
                CopyrightJP = st;

                st  = "===== CopyrightDisclaimer =====" + endl;
                st += "Copyright" + endl;
                st += "The copyright on this software and attached document belongs to the author GNPX" + endl;
                st += "This software is protected by copyright law and international copyright treaty." + endl;
                st += "Users should not remove or alter the rights indication attached to this software." + endl + endl;

                st += "distribution" + endl;
                st += "Secondary distribution on the Internet, introduction etc. can be done without prior consent.";
                st += "Please update the information when upgrading etc etc." + endl;
                st += "In the case of recording / distributing in magazines · books, etc., consent of the author is necessary beforehand." + endl + endl;

                st += "Prohibited matter" + endl;
                st += "The following things are forbidden." + endl;
                st += "Distribute it to other people in forms other than the original." + endl;
                st += "Selling this software to a third party." + endl;
                st += "Promotion, sales and reproduction for sale." + endl;
                st += "Transfer and re-accept the right to use this software to a third party." + endl;
                st += "Modification / removal of this consent form and attached document" + endl + endl;

                st         += "Disclaimer" + endl;
                st         += "The author assumes no responsibility for damage to computers, loss of information or any other direct or indirect damage resulting from the use or inability of the Software." + endl;
                CopyrightEN = st;
                txtCopyrightDisclaimer.Text = CopyrightEN;
                #endregion Copyright

                tabCtrlMode.Focus();
                PB_GBoard.Focus();
//                NuPz_Win_camera();
            }
            catch (Exception e) {
                WriteLine(e.Message + "\r" + e.StackTrace);
            }
        }