void Ge::activate_export_gejava_as() { char name[80]; char default_name[80]; if ( !graph->get_java_name( name)) { graph->get_name( name); if ( strcmp( name, "") != 0) { if ( strncmp( name, "pwr_c_", 6) == 0) { strcpy( default_name, "Jopc"); strcat( default_name, &name[6]); default_name[4] = _toupper( default_name[4]); } else if ( strncmp( name, "pwr_", 4) == 0) { strcpy( default_name, "Jop"); strcat( default_name, &name[4]); default_name[3] = _toupper( default_name[3]); } else { strcpy( default_name, name); default_name[0] = _toupper( default_name[0]); } } else strcpy( default_name, ""); } else strcpy( default_name, name); open_input_dialog( "Java name", "Export GeJava", default_name, Ge::export_gejava); }
void Ge::activate_export_javabean_as() { char name[80]; char default_name[80]; if ( !(graph->is_javaapplication() || graph->is_javaapplet())) { message( 'I', "This graph is not java frame or applet"); return; } if ( !graph->get_java_name( name)) { graph->get_name( name); if ( strcmp( name, "") != 0) { if ( strncmp( name, "pwr_", 4) == 0) { strcpy( default_name, "Jop"); strcat( default_name, &name[4]); default_name[3] = _toupper( default_name[3]); } else { strcpy( default_name, name); default_name[0] = _toupper( default_name[0]); } } else strcpy( default_name, ""); } else strcpy( default_name, name); open_input_dialog( "JavaBean name", "Export JavaBean", default_name, Ge::export_javabean); }
void Ge::activate_export_javabean() { char name[80]; char default_name[80]; if ( ! graph->get_java_name( name)) { graph->get_name( name); if ( strcmp( name, "") != 0) { if ( strncmp( name, "pwr_", 4) == 0) { strcpy( default_name, "Jop"); strcat( default_name, &name[4]); default_name[3] = _toupper( default_name[3]); } else { strcpy( default_name, name); default_name[0] = _toupper( default_name[0]); } } else strcpy( default_name, ""); open_input_dialog( "JavaBean name", "Export JavaBean", default_name, Ge::export_javabean); } else Ge::export_javabean( this, name); }
void Ge::activate_save_as() { char name[40]; if ( graph->trace_started) { message( 'E', "Preview is active"); return; } graph->get_name( name); if ( ! graph->is_subgraph()) open_input_dialog( "Graph name", "Save Graph", name, Ge::save_graph); else open_input_dialog( "SubGraph name", "Save SubGraph", name, Ge::save_graph); }
void Ge::activate_export_plcfo_as() { char name[80]; graph->get_name( name); open_input_dialog( "PlcFo name", "Export PlcFo", name, Ge::export_plcfo); }
void Ge::save_and_close() { char name[40]; graph->get_name( name); if ( strcmp( name, "") == 0) { if ( ! graph->is_subgraph()) open_input_dialog( "Graph name", "Save Graph", "", Ge::save_graph_and_close); else open_input_dialog( "SubGraph name", "Save SubGraph", "", Ge::save_graph_and_close); } else { save_graph( this, name); delete this; } }
void Ge::activate_export_plcfo() { char name[80]; graph->get_name( name); if ( strcmp( name, "") != 0) export_plcfo( this, name); else open_input_dialog( "PlcFo name", "Export PlcFo", "", Ge::export_plcfo); }
void Ge::activate_save() { char name[40]; if ( graph->trace_started) { message( 'I', "Nothing to save"); return; } graph->get_name( name); if ( strcmp( name, "") == 0) { if ( ! graph->is_subgraph()) open_input_dialog( "Graph name", "Save Graph", "", Ge::save_graph); else open_input_dialog( "SubGraph name", "Save SubGraph", "", Ge::save_graph); } else Ge::save_graph( this, name); }
void WRev::activate_store() { char name[80]; pwr_tStatus sts; message(' ', ""); // Check if new revision is allowed sts = wrevnav->rev->create_check(); if (EVEN(sts)) { wow->DisplayError("New Revision Error", "New revision can't be " "created\nCurrent revision is not " "at end of branch"); return; } // Get next revision number wrevnav->rev->next_name(name); open_input_dialog( "Revision name", "Description", "New Revision", name, "", store_ok_cb); }
void Ge::activate_rotate() { open_input_dialog( "Value (degrees)", "Rotate", "", Ge::rotate); }