예제 #1
0
        protected void HelpRequestedEventHandler(object sender, HelpRequestedEventArgs e)
        {
            if (_helpView == null)
            {
                if (string.IsNullOrEmpty(e.HelpBaseUri))
                {
                    e.Cancel = true;
                }
                else
                {
                    _helpView = WorkItem.SmartParts.AddNew <ExplorerView>();

                    SmartPartInfo info = new SmartPartInfo();
                    info.Title = string.Format(StringResources.Application_Help_Title, Id);
                    Uri helpUri = new Uri(new Uri(e.HelpBaseUri), Id + "/default.htm");

                    _helpView.SetUrl(info.Title, helpUri.AbsoluteUri);

                    ShellInteractionService.Show(_helpView, info);
                }
            }
            else
            {
                ShellInteractionService.Show(_helpView);
            }
        }
예제 #2
0
 public RSSWorkWith()
 {
     this.InitializeComponent();
     this.smartPartInfo1 = new SmartPartInfo("RSS vijesti", string.Empty);
     this.infoProvider   = new SmartPartInfoProvider();
     this.infoProvider.Items.Add(this.smartPartInfo1);
 }
예제 #3
0
        private Control BuildUp(WorkItem workitem, string title, UILayout layout)
        {
            System.Threading.Thread.CurrentThread.CurrentUICulture = new System.Globalization.CultureInfo(CultureName);

            //构造上下文
            LayoutBuilderContext context = new LayoutBuilderContext();

            context.WorkItem = workitem;

            //根据布局生成界面
            Control       control = (Control)layout.Layout.BuildUp(context);
            SmartPartInfo sp      = new SmartPartInfo();

            sp.Description = control.Text;
            sp.Title       = title;

            //连接关系处理逻辑
            foreach (IPartRelation relation in layout.Relations)
            {
                relation.BuildUp(context);
            }
            control.Disposed += delegate(object orgsender, System.EventArgs ag)
            {
                DisposeWorkItem(workitem);
            };

            return(control);
        }
예제 #4
0
        public ISmartPartInfo GetSmartPartInfo(Type smartPartInfoType)
        {
            ISmartPartInfo info = new SmartPartInfo();

            info.Title = this.title;
            return(info);
        }
예제 #5
0
 public void exBlockClickHandler(object sender, EventArgs e)
 {
     if (image != null)
     {
         OpenFileDialog ofd = new OpenFileDialog();
         ofd.Multiselect = false;
         ofd.Title       = "Choose an Image to Comparewith";
         DialogResult result = ofd.ShowDialog();
         if (result == DialogResult.OK)
         {
             string filename = ofd.FileName;
             try
             {
                 Bitmap   searchImage = new Bitmap(filename);
                 Bitmap   sourceImage = new Bitmap(path);
                 CompView mov         = this.WorkItem.SmartParts.AddNew <CompView>();
                 mov.panAndZoomPictureBox1.Image = searchImage;
                 SmartPartInfo spi =
                     new SmartPartInfo("Search Image", "MyOwnDescription");
                 this.WorkItem.Workspaces[WorkspaceNames.TabWorkspace].Show(mov, spi);
                 // collect reference points using corners detector (for example)
                 SusanCornersDetector scd    = new SusanCornersDetector(30, 18);
                 List <IntPoint>      points = scd.ProcessImage(sourceImage);
                 // create block matching algorithm's instance
                 ExhaustiveBlockMatching bm = new ExhaustiveBlockMatching();
                 // process images searching for block matchings
                 List <BlockMatch> matches = bm.ProcessImage(sourceImage, points, searchImage);
                 // draw displacement vectors
                 BitmapData data = sourceImage.LockBits(
                     new Rectangle(0, 0, sourceImage.Width, sourceImage.Height),
                     ImageLockMode.ReadWrite, sourceImage.PixelFormat);
                 foreach (BlockMatch match in matches)
                 {
                     // highlight the original point in source image
                     Drawing.FillRectangle(data,
                                           new Rectangle(match.SourcePoint.X - 1, match.SourcePoint.Y - 1, 3, 3),
                                           Color.Yellow);
                     // draw line to the point in search image
                     Drawing.Line(data, match.SourcePoint, match.MatchPoint, Color.Red);
                     // check similarity
                     if (match.Similarity > 0.98f)
                     {
                     }
                 }
                 sourceImage.UnlockBits(data);
                 CompView mov2 = this.WorkItem.SmartParts.AddNew <CompView>();
                 mov2.panAndZoomPictureBox1.Image = sourceImage;
                 SmartPartInfo spi2 =
                     new SmartPartInfo("Results", "MyOwnDescription");
                 this.WorkItem.Workspaces[WorkspaceNames.TabWorkspace].Show(mov2, spi2);
             }
             catch
             {
                 MessageBox.Show("Images Should be of same height and width");
                 return;
             }
         }
     }
 }
예제 #6
0
        public VoditeljFormPregled()
        {
            InitializeComponent();

            this.smartPartInfo1 = new SmartPartInfo("VODITELJI - pregled", "VODITELJI - pregled");
            this.infoProvider   = new SmartPartInfoProvider();
            this.infoProvider.Items.Add(this.smartPartInfo1);
        }
예제 #7
0
        public CjenikFormPregled()
        {
            InitializeComponent();

            this.smartPartInfo1 = new SmartPartInfo("CJENICI - pregled", "Cjenici - pregled");
            this.infoProvider   = new SmartPartInfoProvider();
            this.infoProvider.Items.Add(this.smartPartInfo1);
        }
예제 #8
0
        public uscNagradeNatjecanjaPregled()
        {
            InitializeComponent();

            this.smartPartInfo1 = new SmartPartInfo("Nagrade natjecanja - pregled", "Nagrade natjecanja - pregled");
            this.infoProvider   = new SmartPartInfoProvider();
            this.infoProvider.Items.Add(this.smartPartInfo1);
        }
예제 #9
0
        public OlaksiceFormPregled()
        {
            InitializeComponent();

            this.smartPartInfo1 = new SmartPartInfo("OLAKŠICE - pregled", "OLAKŠICE - pregled");
            this.infoProvider   = new SmartPartInfoProvider();
            this.infoProvider.Items.Add(this.smartPartInfo1);
        }
예제 #10
0
        public CPVOznakeFormPregled()
        {
            InitializeComponent();

            this.smartPartInfo1 = new SmartPartInfo("CPV OZNAKE - pregled", "CPV OZNAKE - pregled");
            this.infoProvider   = new SmartPartInfoProvider();
            this.infoProvider.Items.Add(this.smartPartInfo1);
        }
예제 #11
0
        public uscPutniNalogPregled()
        {
            InitializeComponent();

            this.smartPartInfo1 = new SmartPartInfo("Putni nalog - pregled", "Putni nalog - pregled");
            this.infoProvider   = new SmartPartInfoProvider();
            this.infoProvider.Items.Add(this.smartPartInfo1);
        }
예제 #12
0
        public FiskalneGodineFormPregled()
        {
            InitializeComponent();

            this.smartPartInfo1 = new SmartPartInfo("FISKALNE GODINE - pregled", "FISKALNE GODINE - pregled");
            this.infoProvider   = new SmartPartInfoProvider();
            this.infoProvider.Items.Add(this.smartPartInfo1);
        }
예제 #13
0
        public UstanovaFormPregled()
        {
            InitializeComponent();

            this.smartPartInfo1 = new SmartPartInfo("USTANOVE - pregled", "USTANOVE - pregled");
            this.infoProvider   = new SmartPartInfoProvider();
            this.infoProvider.Items.Add(this.smartPartInfo1);
        }
예제 #14
0
        public uscStipendijePregled()
        {
            InitializeComponent();

            this.smartPartInfo1 = new SmartPartInfo("Stipendije - pregled", "Stipendije - pregled");
            this.infoProvider   = new SmartPartInfoProvider();
            this.infoProvider.Items.Add(this.smartPartInfo1);
        }
예제 #15
0
        public uscSocijalnaPotporaPregled()
        {
            InitializeComponent();

            this.smartPartInfo1 = new SmartPartInfo("Prijevoz nezaposleni - pregled", "Prijevoz nezaposleni - pregled");
            this.infoProvider   = new SmartPartInfoProvider();
            this.infoProvider.Items.Add(this.smartPartInfo1);
        }
예제 #16
0
        public TipSkladistaPregled()
        {
            InitializeComponent();

            this.smartPartInfo1 = new SmartPartInfo("Unos Tipa skladišta - pregled", "Unos Tipa skladišta - pregled");
            this.infoProvider   = new SmartPartInfoProvider();
            this.infoProvider.Items.Add(this.smartPartInfo1);
        }
예제 #17
0
        public uscStjecateljPrimitkaElementPregled()
        {
            InitializeComponent();

            this.smartPartInfo1 = new SmartPartInfo("Stjecatelj primitka element - pregled", "Stjecatelj primitka element - pregled");
            this.infoProvider   = new SmartPartInfoProvider();
            this.infoProvider.Items.Add(this.smartPartInfo1);
        }
예제 #18
0
        public void CanUseNotTabSPI()
        {
            SmartPartInfo info = new SmartPartInfo();

            info.Title = "Foo";

            workspace.Show(sp, info);
        }
예제 #19
0
        public uscNeoporezivPrimitakPregled()
        {
            InitializeComponent();

            this.smartPartInfo1 = new SmartPartInfo("Neoporezivi primitak - pregled", "Neoporezivi primitak - pregled");
            this.infoProvider   = new SmartPartInfoProvider();
            this.infoProvider.Items.Add(this.smartPartInfo1);
        }
예제 #20
0
        public UstanovaSkolskaGodinaRazrednoOdjeljenjeFormPregled()
        {
            InitializeComponent();

            this.smartPartInfo1 = new SmartPartInfo("ORGANIZACIJA RAZREDNIH ODJELJENJA - pregled", "ORGANIZACIJA RAZREDNIH ODJELJENJA - pregled");
            this.infoProvider   = new SmartPartInfoProvider();
            this.infoProvider.Items.Add(this.smartPartInfo1);
        }
예제 #21
0
        public NacinPlacanjaFormPregled()
        {
            InitializeComponent();

            this.smartPartInfo1 = new SmartPartInfo("NACIN PLACANJA - pregled", "NACIN PLACANJA - pregled");
            this.infoProvider   = new SmartPartInfoProvider();
            this.infoProvider.Items.Add(this.smartPartInfo1);
        }
예제 #22
0
        public uscStudentServisOporezivoPregled()
        {
            InitializeComponent();

            this.smartPartInfo1 = new SmartPartInfo("Student servis oporezivo - pregled", "Student servis oporezivo - pregled");
            this.infoProvider   = new SmartPartInfoProvider();
            this.infoProvider.Items.Add(this.smartPartInfo1);
        }
예제 #23
0
        public UstanovaSkolskaGodinaFormPregled()
        {
            InitializeComponent();

            this.smartPartInfo1 = new SmartPartInfo("USTANOVE / ŠKOLSKE GODINE - pregled", "USTANOVE / ŠKOLSKE GODINE - pregled");
            this.infoProvider   = new SmartPartInfoProvider();
            this.infoProvider.Items.Add(this.smartPartInfo1);
        }
예제 #24
0
        public uscNacinIsplateElementPregled()
        {
            InitializeComponent();

            this.smartPartInfo1 = new SmartPartInfo("Način isplate element - pregled", "Način isplate element - pregled");
            this.infoProvider   = new SmartPartInfoProvider();
            this.infoProvider.Items.Add(this.smartPartInfo1);
        }
예제 #25
0
        public uscRacuniPregled()
        {
            InitializeComponent();

            this.smartPartInfo1 = new SmartPartInfo("Računi - pregled", "Računi - pregled");
            this.infoProvider   = new SmartPartInfoProvider();
            this.infoProvider.Items.Add(this.smartPartInfo1);
        }
예제 #26
0
        public uscPredlosciPregled()
        {
            InitializeComponent();

            this.smartPartInfo1 = new SmartPartInfo("Predlošci - pregled", "Predlošci - pregled");
            this.infoProvider   = new SmartPartInfoProvider();
            this.infoProvider.Items.Add(this.smartPartInfo1);
        }
예제 #27
0
        public PlanNabaveFormPregled()
        {
            InitializeComponent();

            this.smartPartInfo1 = new SmartPartInfo("PLAN NABAVE - pregled", "PLAN NABAVE - pregled");
            this.infoProvider   = new SmartPartInfoProvider();
            this.infoProvider.Items.Add(this.smartPartInfo1);
        }
예제 #28
0
        public uscSocijalnaNaknadaPregled()
        {
            InitializeComponent();

            this.smartPartInfo1 = new SmartPartInfo("Socijalna naknada - pregled", "Socijalna naknada - pregled");
            this.infoProvider   = new SmartPartInfoProvider();
            this.infoProvider.Items.Add(this.smartPartInfo1);
        }
예제 #29
0
 public GODINEWorkWith()
 {
     this.InitializeComponent();
     this.smartPartInfo1 = new SmartPartInfo(string.Format(Deklarit.Resources.Resources.WorkWithTitle, StringResources.GODINEDescription), string.Format(Deklarit.Resources.Resources.WorkWithTitle, StringResources.GODINEDescription));
     this.infoProvider   = new SmartPartInfoProvider();
     this.infoProvider.Items.Add(this.smartPartInfo1);
     this.userControlDataGridGODINE.DataGrid.AfterRowActivate += new EventHandler(this.DataGrid_AfterRowActivate);
 }
예제 #30
0
        public GrupeProizvodaPregled()
        {
            InitializeComponent();

            this.smartPartInfo1 = new SmartPartInfo("Unos Grupe proizvoda - pregled", "Unos Grupe proizvoda - pregled");
            this.infoProvider   = new SmartPartInfoProvider();
            this.infoProvider.Items.Add(this.smartPartInfo1);
        }