public void UrlAndButtonsVisibility(BrowserTarget target) { //pbar = ProgressBar; if (target.Equals(BrowserTarget.Enjazit)) { TxtenjazUrl.Text = "https://enjazit.com.sa/Account/Login/Company";//""; //"file:///C:/Users/user/Desktop/Offline%20Pages/Enjaz2/Visa%20Services%20Platform%20(Enjaz).htm"; BtnFillEnjaz.Visibility = Visibility.Visible; BtnEnjazDocuments.Visibility = Visibility.Visible; BtnFillMusaned.Visibility = Visibility.Collapsed; BtnImportVisa.Visibility = Visibility.Collapsed; BtnFillInsurance.Visibility = Visibility.Collapsed; LstItemsAutoCompleteBox.Visibility = Visibility.Visible; BtnReload.Visibility = Visibility.Visible; LstEnjazitEmployeeDetail.Visibility = Visibility.Visible; } else if (target.Equals(BrowserTarget.Musaned)) { TxtenjazUrl.Text = "https://et.musaned.com.sa";// "file:///C:/Users/user/Desktop/Offline%20Pages/MusanedShowCandidate.html";// "file:///C:/Users/user/Desktop/Offline%20Pages/MusanedContract.html";// //"file:///C:/Users/user/Desktop/Offline%20Pages/MusanedEntry.html"; BtnFillEnjaz.Visibility = Visibility.Collapsed; BtnEnjazDocuments.Visibility = Visibility.Collapsed; BtnFillMusaned.Visibility = Visibility.Visible; BtnImportVisa.Visibility = Visibility.Visible; BtnFillInsurance.Visibility = Visibility.Collapsed; LstItemsAutoCompleteBox.Visibility = Visibility.Visible; BtnReload.Visibility = Visibility.Visible; LstEnjazitEmployeeDetail.Visibility = Visibility.Visible; } else if (target.Equals(BrowserTarget.UnitedInsurance)) { TxtenjazUrl.Text = "http://glp.unicportal.com.et:96/"; //"file:///C:/Users/user/Desktop/Offline%20Pages/United%20Insurance%20Company%20SC.html"; BtnFillEnjaz.Visibility = Visibility.Collapsed; BtnEnjazDocuments.Visibility = Visibility.Collapsed; BtnFillMusaned.Visibility = Visibility.Collapsed; BtnImportVisa.Visibility = Visibility.Collapsed; BtnFillInsurance.Visibility = Visibility.Visible; LstItemsAutoCompleteBox.Visibility = Visibility.Visible; BtnReload.Visibility = Visibility.Visible; LstEnjazitEmployeeDetail.Visibility = Visibility.Visible; } else if (target.Equals(BrowserTarget.PinnaFace)) { TxtenjazUrl.Text = "http://www.pinnaface.com/Employee/Thumbnail"; BtnFillEnjaz.Visibility = Visibility.Collapsed; BtnEnjazDocuments.Visibility = Visibility.Collapsed; BtnFillMusaned.Visibility = Visibility.Collapsed; BtnImportVisa.Visibility = Visibility.Collapsed; BtnFillInsurance.Visibility = Visibility.Collapsed; LstItemsAutoCompleteBox.Visibility = Visibility.Collapsed; BtnReload.Visibility = Visibility.Collapsed; LstEnjazitEmployeeDetail.Visibility = Visibility.Collapsed; } }
public EnjazitBrowser(BrowserTarget target) { CefSettings settings = new CefSettings(); string path = Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData) + @"\CEF"; settings.RemoteDebuggingPort = 8080; settings.CachePath = path; //Initialize Cef with the provided settings if (!Cef.IsInitialized) { Cef.Initialize(settings); } InitializeComponent(); Messenger.Default.Send <BrowserTarget>((BrowserTarget)target); Messenger.Reset(); UrlAndButtonsVisibility(target); }